<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<script type="text/javascript">
	function checkForm() {
		var typeName = document.getElementById("typeName").value;
		if (typeName == null || typeName == "") {
			document.getElementById("error").innerHTML = "类别名称不能为空！";
			return false;
		}
		return true;
	}
</script>

<div class="data_list">
	<div class="data_list_title">
		<img src="${pageContext.request.contextPath}/images/diary_type_edit_icon.png"/>修改日记类别
	</div>
	<form action="${pageContext.request.contextPath }/dirayType?method=edit" method="post" onsubmit="return checkForm()">
		<input type="hidden" name="dirayTypeId" value="${dirayType.dirayTypeId }">
		<div class="diaryType_form">
			<table align="center">
				<tr>
					<td>类别名称：</td>
					<td><input type="text" id="typeName" name="dirayTypeName"
						value="${dirayType.dirayTypeName }" style="margin-top:5px;height:30px;" /></td>
				</tr>
				<tr>
					<td><input type="submit" class="btn btn-primary" value="保存" /></td>
					<td><button class="btn btn-primary" type="button"
							onclick="javascript:history.back()">取消</button>&nbsp;&nbsp;<font
						id="error" color="red">${error }</font></td>
				</tr>
			</table>
		</div>
	</form>
</div>
